<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-haiku;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetNetworkInformation_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="System\Net\NetworkInformation\DuplicateAddressDetectionState.cs" />
    <Compile Include="System\Net\NetworkInformation\GatewayIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\GatewayIPAddressInformationCollection.cs" />
    <Compile Include="System\Net\NetworkInformation\IcmpV4Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IcmpV6Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\IPAddressInformationCollection.cs" />
    <Compile Include="System\Net\NetworkInformation\IPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\IPGlobalStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IPInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\IPInterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\Ipv4InterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\MulticastIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs" />
    <Compile Include="System\Net\NetworkInformation\NetBiosNodeType.cs" />
    <Compile Include="System\Net\NetworkInformation\NetEventSource.NetworkInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.cs" Condition="'$(TargetPlatformIdentifier)' != 'illumos' and '$(TargetPlatformIdentifier)' != 'solaris' and '$(TargetPlatformIdentifier)' != 'haiku'" />
    <Compile Include="System\Net\NetworkInformation\NetworkAvailabilityEventArgs.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkChangeDelegates.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfaceComponent.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfaceType.cs" />
    <Compile Include="System\Net\NetworkInformation\OperationalStatus.cs" />
    <Compile Include="System\Net\NetworkInformation\PhysicalAddress.cs" />
    <Compile Include="System\Net\NetworkInformation\PrefixOrigin.cs" />
    <Compile Include="System\Net\NetworkInformation\ScopeLevel.cs" />
    <Compile Include="System\Net\NetworkInformation\SuffixOrigin.cs" />
    <Compile Include="System\Net\NetworkInformation\TcpConnection.cs" />
    <Compile Include="System\Net\NetworkInformation\TcpState.cs" />
    <Compile Include="System\Net\NetworkInformation\TcpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\UdpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\UnicastIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\UnicastIPAddressInformationCollection.cs" />
    <Compile Include="System\Net\NetworkInformation\InternalIPAddressCollection.cs" />
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
    <Compile Include="$(CommonPath)System\NotImplemented.cs" Link="Common\System\NotImplemented.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformation.cs" Link="Common\System\Net\NetworkInformation\HostInformation.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\NetworkInformationException.cs" Link="Common\System\Net\NetworkInformation\NetworkInformationException.cs" />
    <Compile Include="$(CommonPath)System\HexConverter.cs" Link="Common\System\HexConverter.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <!-- Interop -->
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs" Link="Common\Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs" Link="Common\Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs" />
    <Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Windows.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.Windows.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Windows.cs" />
    <Compile Include="System\Net\NetworkInformation\SafeCancelMibChangeNotify.cs" />
    <Compile Include="System\Net\NetworkInformation\SafeFreeMibTable.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemGatewayIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIcmpV4Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIcmpV6Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPGlobalStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPInterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPv4InterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemIPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemMulticastIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemNetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemTcpConnection.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemTcpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemUdpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\SystemUnicastIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\TeredoHelper.cs" />
    <!-- System.Net common -->
    <Compile Include="$(CommonPath)System\Net\IPAddressParserStatics.cs" Link="Common\System\Net\IPAddressParserStatics.cs" />
    <Compile Include="$(CommonPath)System\Net\IPEndPointExtensions.cs" Link="Common\System\Net\IPEndPointExtensions.cs" />
    <Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs" Link="Common\System\Net\SocketAddressPal.Windows.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\StartIPOptions.cs" Link="Common\System\Net\NetworkInformation\StartIPOptions.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Windows.cs" Link="Common\System\Net\NetworkInformation\HostInformationPal.Windows.cs" />
    <!-- Interop -->
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs" Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs" Link="Common\Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs" Link="Common\Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.NetworkInformation.cs" Link="Common\Interop\Windows\IpHlpApi\Interop.NetworkInformation.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.WinsockBSD.cs" Link="Common\Interop\Windows\WinSock\Interop.WinsockBSD.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.WSAEventSelect.cs" Link="Common\Interop\Windows\WinSock\Interop.WSAEventSelect.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.WSAIoctl.cs" Link="Common\Interop\Windows\WinSock\Interop.WSAIoctl.cs" />
  </ItemGroup>

  <!-- Unix -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
    <Compile Include="System\Net\NetworkInformation\IPAddressUtil.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkFiles.cs" />
    <Compile Include="System\Net\NetworkInformation\SimpleGatewayIPAddressInformation.Unix.cs" />
    <Compile Include="System\Net\NetworkInformation\SimpleTcpConnectionInformation.Unix.cs" />
    <Compile Include="System\Net\NetworkInformation\StringParsingHelpers.Dns.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixIPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixIPInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixIPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixIPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixMulticastIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixNetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\UnixUnicastIPAddressInformation.cs" />
    <!-- Unix Common -->
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Common\Interop\Unix\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.EnumerateInterfaceAddresses.cs" Link="Common\Interop\Unix\System.Native\Interop.EnumerateInterfaceAddresses.cs" />
    <Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Unix.cs" Link="System\Net\NetworkInformation\HostInformationPal.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetDomainName.cs" Link="Common\Interop\Unix\System.Native\Interop.GetDomainName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetHostName.cs" Link="Common\Interop\Unix\System.Native\Interop.GetHostName.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.MapTcpState.cs" Link="Common\Interop\Unix\System.Native\Interop.MapTcpState.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs" Link="Common\Interop\CoreLib\Unix\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)System\IO\RowConfigReader.cs" Link="Common\System\IO\RowConfigReader.cs" />
  </ItemGroup>

  <!-- Linux (other than Android) -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'linux'">
    <Compile Include="System\Net\NetworkInformation\ExceptionHelper.Linux.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIcmpV4Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIcmpV6Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxTcpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxUdpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Linux.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPAddressInformation.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPGlobalStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPInterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Linux.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxNetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPv4InterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\LinuxIPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\StringParsingHelpers.Addresses.cs" />
    <Compile Include="System\Net\NetworkInformation\StringParsingHelpers.Connections.cs" />
    <Compile Include="System\Net\NetworkInformation\StringParsingHelpers.Misc.cs" />
    <Compile Include="System\Net\NetworkInformation\StringParsingHelpers.Statistics.cs" />
    <!-- Linux Common -->
    <Compile Include="$(CommonPath)System\IO\StringParser.cs" Link="Common\System\IO\StringParser.cs" />
    <Compile Include="$(CommonPath)Interop\Linux\Interop.LinuxNetDeviceFlags.cs" Link="Common\Interop\Linux\Interop.LinuxNetDeviceFlags.cs" />
  </ItemGroup>

  <!-- Android -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'android'">
    <Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Android.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidIPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidIPGlobalStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidIPInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidIPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidIPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\AndroidNetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Android.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.Android.cs" />
  </ItemGroup>

  <!-- OSX -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'osx' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'freebsd'">
    <Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Bsd.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Bsd.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIcmpV4Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIcmpV6Statistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIPGlobalProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIPv4GlobalStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIpInterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIPv4InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIPv4InterfaceStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIPv6InterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdIpInterfaceProperties.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdNetworkInterface.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdTcpStatistics.cs" />
    <Compile Include="System\Net\NetworkInformation\BsdUdpStatistics.cs" />
    <!-- BSD Common -->
    <Compile Include="$(CommonPath)Interop\BSD\System.Native\Interop.ProtocolStatistics.cs" Link="Common\Interop\BSD\System.Native\Interop.ProtocolStatistics.cs" />
    <Compile Include="$(CommonPath)Interop\BSD\System.Native\Interop.TcpConnectionInfo.cs" Link="Common\Interop\BSD\System.Native\Interop.TcpConnectionInfo.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'osx' or '$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos'">
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.OSX.cs" />
    <!-- OSX Common -->
    <Compile Include="$(CommonPath)Interop\OSX\Interop.CoreFoundation.cs" Link="Common\Interop\OSX\Interop.CoreFoundation.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs" Link="Common\Interop\OSX\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.RunLoop.cs" Link="Common\Interop\OSX\Interop.RunLoop.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.SystemConfiguration.cs" Link="Common\Interop\OSX\Interop.SystemConfiguration.cs" />
    <Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" Link="Common\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'freebsd'">
    <Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Libraries.cs" Link="Common\Interop\FreeBSD\Interop.Libraries.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'linux' or '$(TargetPlatformIdentifier)' == 'freebsd'">
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.NetworkChange.cs" Link="Common\Interop\Unix\System.Native\Interop.NetworkChange.cs" />
  </ItemGroup>

  <!-- Unknown Unix -->
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'illumos' or '$(TargetPlatformIdentifier)' == 'solaris' or '$(TargetPlatformIdentifier)' == 'haiku'">
    <Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.UnknownUnix.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.UnknownUnix.cs" />
    <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.UnknownUnix.cs" />
  </ItemGroup>

  <ItemGroup>
    <SupportedPlatform Include="illumos"/>
    <SupportedPlatform Include="Solaris "/>
    <SupportedPlatform Include="Haiku"/>
  </ItemGroup>

  <ItemGroup>
    <Reference Include="Microsoft.Win32.Primitives" />
    <Reference Include="System.Collections" />
    <Reference Include="System.Diagnostics.Tracing" />
    <Reference Include="System.Memory" />
    <Reference Include="System.Net.Primitives" />
    <Reference Include="System.Net.Sockets" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
    <Reference Include="System.Threading" />
    <Reference Include="System.Threading.Overlapped" />
    <Reference Include="System.Threading.ThreadPool" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
    <Reference Include="System.Threading.Thread" />
  </ItemGroup>

</Project>
